home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat1 / backslash.1 < prev    next >
Text File  |  1999-09-16  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4. backslash(1)                   Scilab Function                   backslash(1)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   \ - left matrix division backslash
  13.  
  14. CALLING SEQUENCE
  15.   x=A\b
  16.  
  17. DESCRIPTION
  18.   Backslash denotes left matrix division. x=A\b is a solution to A*x=b.
  19.  
  20.   If A is nonsingular x=A\b (uniquely defined) is equivalent to x=inv(A)*b.
  21.  
  22.   If A is singular, x is a least square solution.  i.e. norm(A*x-b) is
  23.   minimal. If A is full column rank, the least square solution, x=A\b, is
  24.   uniquely defined (there is a unique x which minimizes norm(A*x-b)).  If A
  25.   is not full column rank, then the least square solution is not unique, and
  26.   x=A\b, in general, is not the solution with minimum norm (the minimum norm
  27.   solution is x=pinv(A)*b).
  28.  
  29.   A.\B  is the matrix with (i,j) entry A(i,j)\B(i,j).  If A (or B) is a
  30.   scalar A.\B is equivalent to A*ones(B).\B (or A.\(B*ones(A))
  31.  
  32. EXAMPLE
  33.   A=rand(3,2);b=[1;1;1]; x=A\b; y=pinv(A)*b;  x-y
  34.   A=rand(2,3);b=[1;1]; x=A\b; y=pinv(A)*b; x-y, A*x-b, A*y-b
  35.   A=rand(3,1)*rand(1,2); b=[1;1;1]; x=A\b; y=pinv(A)*b; A*x-b, A*y-b
  36.   A=rand(2,1)*rand(1,3); b=[1;1]; x=A\b; y=pinv(A)*b; A*x-b, A*y-b
  37.  
  38. SEE ALSO
  39.   slash, inv, pinv, percent
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.